<?php
class Register extends Form
{
	/** 
	*	author: Lukasz Kowalski
	*	contact:wokiee@wokiee.com
	*	request author permmision before you use this class!
	*	this class allow to generate register form with ajax input validation
	*	this class requires to use jQuery library and validatator plugin
	*	You can download this libraries from http://jquery.com
	*
	*/	
	private $javascript;
	public function userRegister(){
	/**
	*	Method creates new user register form with jquery javascript valideate code
	*	you can modify fields with your preferences :) 
	*/
	/*javascript init*/
	$this->javascript.="<script>\n$(document).ready(function(){\n $(\"form\").validate({rules: { ";
	
	$this->startFieldset('User Account');
		$this->textInput('login','Login:','block');
		$this->javascript.='login: {required: true, minlength: 6 },';
		
		$this->passInput('password','Password:','block');
		$this->javascript.='password: {required: true, minlength: 6 },';

		$this->passInput('passwordagain','Retype Password:','block');
		$this->javascript.='passwordagain: {required: true, equalTo: "#password" },';	

		$this->textInput('eMail','Your email:','block');
		$this->javascript.='eMail: {required: true, email: true},';

		$this->textInput('eMailagain','Your email again:','block');
		$this->javascript.='eMailagain: {required: true, equalTo: "#eMail"},';

	$this->customAddForm('<em><pow>*</pow>All fields are required!</em>');
	$this->endFieldset();

	$this->startFieldset('Private');

		$this->textInput('FirstName','First Name:','block');
		$this->javascript.='FirstName: {required: true, minlength: 3 },';
		
		$this->textInput('LastName','Last Name:','block');
		$this->javascript.='LastName: {required: true, minlength: 2 },';

		$this->textInput('Street','Street:','block');
		$this->javascript.='Street: {required: true, minlength: 2 },';

		$this->textInput('Number','House Number:','block');
		$this->javascript.='Number: {required: true, minlength: 1, digits:true },';

		$this->textInput('Locum','Locum Number<pow>*</pow>:','block');
		$this->javascript.='Locum: {minlength: 1, digits:true },';
		
		$this->textInput('Region','Region<pow>*</pow>:','block');
		$this->javascript.='Region: {minlength: 3 },';
		
		$this->startSelect('country','Your Country:','block');
			$this->addSelectOption('','Chose...');
			$this->addSelectOption('Afghanistan','Afghanistan');
			$this->addSelectOption('Albania','Albania');
			$this->addSelectOption('Algeria','Algeria');
			$this->addSelectOption('American Samoa','American Samoa');
			$this->addSelectOption('Andorra','Andorra');
			$this->addSelectOption('Angola','Angola');
			$this->addSelectOption('Anguilla','Anguilla');
			$this->addSelectOption('Antarctica','Antarctica');
			$this->addSelectOption('Antigua and Barbuda','Antigua and Barbuda');
			$this->addSelectOption('Argentina','Argentina');
			$this->addSelectOption('Armenia','Armenia');
			$this->addSelectOption('Aruba','Aruba');
			$this->addSelectOption('Australia','Australia');
			$this->addSelectOption('Austria','Austria');
			$this->addSelectOption('Azerbaijan','Azerbaijan');
			$this->addSelectOption('Bahamas','Bahamas');
			$this->addSelectOption('Bahrain','Bahrain');
			$this->addSelectOption('Bangladesh','Bangladesh');
			$this->addSelectOption('Barbados','Barbados');
			$this->addSelectOption('Belarus','Belarus');
			$this->addSelectOption('Belgium','Belgium');
			$this->addSelectOption('Belize','Belize');
			$this->addSelectOption('Benin','Benin');
			$this->addSelectOption('Bermuda','Bermuda');
			$this->addSelectOption('Bhutan','Bhutan');
			$this->addSelectOption('Bolivia','Bolivia');
			$this->addSelectOption('Bosnia and Herzegowina','Bosnia and Herzegowina');
			$this->addSelectOption('Botswana','Botswana');
			$this->addSelectOption('Bouvet Island','Bouvet Island');
			$this->addSelectOption('Brazil','Brazil');
			$this->addSelectOption('British Indian Ocean Territory','British Indian Ocean Territory');
			$this->addSelectOption('Brunei Darussalam','Brunei Darussalam');
			$this->addSelectOption('Bulgaria','Bulgaria');
			$this->addSelectOption('Burkina Faso','Burkina Faso');
			$this->addSelectOption('Burundi','Burundi');
			$this->addSelectOption('Cambodia','Cambodia');
			$this->addSelectOption('Cameroon','Cameroon');
			$this->addSelectOption('Canada','Canada');
			$this->addSelectOption('Cape Verde','Cape Verde');
			$this->addSelectOption('Cayman Islands','Cayman Islands');
			$this->addSelectOption('Central African Republic','Central African Republic');
			$this->addSelectOption('Chad','Chad');
			$this->addSelectOption('Chile','Chile');
			$this->addSelectOption('China','China');
			$this->addSelectOption('Christmas Island','Christmas Island');
			$this->addSelectOption('Cocos (Keeling) Islands','Cocos (Keeling) Islands');
			$this->addSelectOption('Colombia','Colombia');
			$this->addSelectOption('Comoros','Comoros');
			$this->addSelectOption('Congo','Congo');
			$this->addSelectOption('Cook Islands','Cook Islands');
			$this->addSelectOption('Costa Rica','Costa Rica');
			$this->addSelectOption('Cote D&#039;Ivoire','Cote D&#039;Ivoire');
			$this->addSelectOption('Croatia','Croatia');
			$this->addSelectOption('Cuba','Cuba');
			$this->addSelectOption('Cyprus','Cyprus');
			$this->addSelectOption('Czech Republic','Czech Republic');
			$this->addSelectOption('Denmark','Denmark');
			$this->addSelectOption('Djibouti','Djibouti');
			$this->addSelectOption('Dominica','Dominica');
			$this->addSelectOption('Dominican Republic','Dominican Republic');
			$this->addSelectOption('East Timor','East Timor');
			$this->addSelectOption('Ecuador','Ecuador');
			$this->addSelectOption('Egypt','Egypt');
			$this->addSelectOption('El Salvador','El Salvador');
			$this->addSelectOption('Equatorial Guinea','Equatorial Guinea');
			$this->addSelectOption('Eritrea','Eritrea');
			$this->addSelectOption('Estonia','Estonia');
			$this->addSelectOption('Ethiopia','Ethiopia');
			$this->addSelectOption('Falkland Islands (Malvinas)','Falkland Islands (Malvinas)');
			$this->addSelectOption('Faroe Islands','Faroe Islands');
			$this->addSelectOption('Fiji','Fiji');
			$this->addSelectOption('Finland','Finland');
			$this->addSelectOption('France','France');
			$this->addSelectOption('France, Metropolitan','France, Metropolitan');
			$this->addSelectOption('French Guiana','French Guiana');
			$this->addSelectOption('French Polynesia','French Polynesia');
			$this->addSelectOption('French Southern Territories','French Southern Territories');
			$this->addSelectOption('Gabon','Gabon');
			$this->addSelectOption('Gambia','Gambia');
			$this->addSelectOption('Georgia','Georgia');
			$this->addSelectOption('Germany','Germany');
			$this->addSelectOption('Ghana','Ghana');
			$this->addSelectOption('Gibraltar','Gibraltar');
			$this->addSelectOption('Greece','Greece');
			$this->addSelectOption('Greenland','Greenland');
			$this->addSelectOption('Grenada','Grenada');
			$this->addSelectOption('Guadeloupe','Guadeloupe');
			$this->addSelectOption('Guam','Guam');
			$this->addSelectOption('Guatemala','Guatemala');
			$this->addSelectOption('Guinea','Guinea');
			$this->addSelectOption('Guinea-bissau','Guinea-bissau');
			$this->addSelectOption('Guyana','Guyana');
			$this->addSelectOption('Haiti','Haiti');
			$this->addSelectOption('Heard and Mc Donald Islands','Heard and Mc Donald Islands');
			$this->addSelectOption('Honduras','Honduras');
			$this->addSelectOption('Hong Kong','Hong Kong');
			$this->addSelectOption('Hungary','Hungary');
			$this->addSelectOption('Iceland','Iceland');
			$this->addSelectOption('India','India');
			$this->addSelectOption('Indonesia','Indonesia');
			$this->addSelectOption('Iran (Islamic Republic of)','Iran (Islamic Republic of)');
			$this->addSelectOption('Iraq','Iraq');
			$this->addSelectOption('Ireland','Ireland');
			$this->addSelectOption('Israel','Israel');
			$this->addSelectOption('Italy','Italy');
			$this->addSelectOption('Jamaica','Jamaica');
			$this->addSelectOption('Japan','Japan');
			$this->addSelectOption('Jordan','Jordan');
			$this->addSelectOption('Kazakhstan','Kazakhstan');
			$this->addSelectOption('Kenya','Kenya');
			$this->addSelectOption('Kiribati','Kiribati');
			$this->addSelectOption('Korea, Democratic People&#039;s Republic of','Korea, Democratic People&#039;s Republic of');
			$this->addSelectOption('Korea, Republic of','Korea, Republic of');
			$this->addSelectOption('Kuwait','Kuwait');
			$this->addSelectOption('Kyrgyzstan','Kyrgyzstan');
			$this->addSelectOption('Lao People&#039;s Democratic Republic','Lao People&#039;s Democratic Republic');
			$this->addSelectOption('Latvia','Latvia');
			$this->addSelectOption('Lebanon','Lebanon');
			$this->addSelectOption('Lesotho','Lesotho');
			$this->addSelectOption('Liberia','Liberia');
			$this->addSelectOption('Libyan Arab Jamahiriya','Libyan Arab Jamahiriya');
			$this->addSelectOption('Liechtenstein','Liechtenstein');
			$this->addSelectOption('Lithuania','Lithuania');
			$this->addSelectOption('Luxembourg','Luxembourg');
			$this->addSelectOption('Macau','Macau');
			$this->addSelectOption('Macedonia, The Former Yugoslav Republic of','Macedonia, The Former Yugoslav Republic of');
			$this->addSelectOption('Madagascar','Madagascar');
			$this->addSelectOption('Malawi','Malawi');
			$this->addSelectOption('Malaysia','Malaysia');
			$this->addSelectOption('Maldives','Maldives');
			$this->addSelectOption('Mali','Mali');
			$this->addSelectOption('Malta','Malta');
			$this->addSelectOption('Marshall Islands','Marshall Islands');
			$this->addSelectOption('Martinique','Martinique');
			$this->addSelectOption('Mauritania','Mauritania');
			$this->addSelectOption('Mauritius','Mauritius');
			$this->addSelectOption('Mayotte','Mayotte');
			$this->addSelectOption('Mexico','Mexico');
			$this->addSelectOption('Micronesia, Federated States of','Micronesia, Federated States of');
			$this->addSelectOption('Moldova, Republic of','Moldova, Republic of');
			$this->addSelectOption('Monaco','Monaco');
			$this->addSelectOption('Mongolia','Mongolia');
			$this->addSelectOption('Montserrat','Montserrat');
			$this->addSelectOption('Morocco','Morocco');
			$this->addSelectOption('Mozambique','Mozambique');
			$this->addSelectOption('Myanmar','Myanmar');
			$this->addSelectOption('Namibia','Namibia');
			$this->addSelectOption('Nauru','Nauru');
			$this->addSelectOption('Nepal','Nepal');
			$this->addSelectOption('Netherlands','Netherlands');
			$this->addSelectOption('Netherlands Antilles','Netherlands Antilles');
			$this->addSelectOption('New Caledonia','New Caledonia');
			$this->addSelectOption('New Zealand','New Zealand');
			$this->addSelectOption('Nicaragua','Nicaragua');
			$this->addSelectOption('Nigeria','Nigeria');
			$this->addSelectOption('Niue','Niue');
			$this->addSelectOption('Norfolk Island','Norfolk Island');
			$this->addSelectOption('Northern Mariana Islands','Northern Mariana Islands');
			$this->addSelectOption('Norway','Norway');
			$this->addSelectOption('Oman','Oman');
			$this->addSelectOption('Pakistan','Pakistan');
			$this->addSelectOption('Palau','Palau');
			$this->addSelectOption('Panama','Panama');
			$this->addSelectOption('Papua New Guinea','Papua New Guinea');
			$this->addSelectOption('Paraguay','Paraguay');
			$this->addSelectOption('Peru','Peru');
			$this->addSelectOption('Philippines','Philippines');
			$this->addSelectOption('Pitcairn','Pitcairn');
			$this->addSelectOption('Poland','Poland');
			$this->addSelectOption('Portugal','Portugal');
			$this->addSelectOption('Puerto Rico','Puerto Rico');
			$this->addSelectOption('Qatar','Qatar');
			$this->addSelectOption('Reunion','Reunion');
			$this->addSelectOption('Romania','Romania');
			$this->addSelectOption('Russian Federation','Russian Federation');
			$this->addSelectOption('Rwanda','Rwanda');
			$this->addSelectOption('Saint Kitts and Nevis','Saint Kitts and Nevis');
			$this->addSelectOption('Saint Lucia','Saint Lucia');
			$this->addSelectOption('Saint Vincent and the Grenadines','Saint Vincent and the Grenadines');
			$this->addSelectOption('Samoa','Samoa');
			$this->addSelectOption('San Marino','San Marino');
			$this->addSelectOption('Sao Tome and Principe','Sao Tome and Principe');
			$this->addSelectOption('Saudi Arabia','Saudi Arabia');
			$this->addSelectOption('Senegal','Senegal');
			$this->addSelectOption('Seychelles','Seychelles');
			$this->addSelectOption('Sierra Leone','Sierra Leone');
			$this->addSelectOption('Singapore','Singapore');
			$this->addSelectOption('Slovakia (Slovak Republic)','Slovakia (Slovak Republic)');
			$this->addSelectOption('Slovenia','Slovenia');
			$this->addSelectOption('Solomon Islands','Solomon Islands');
			$this->addSelectOption('Somalia','Somalia');
			$this->addSelectOption('South Africa','South Africa');
			$this->addSelectOption('South Georgia and the South Sandwich Islands','South Georgia and the South Sandwich Islands');
			$this->addSelectOption('Spain','Spain');
			$this->addSelectOption('Sri Lanka','Sri Lanka');
			$this->addSelectOption('St. Helena','St. Helena');
			$this->addSelectOption('St. Pierre and Miquelon','St. Pierre and Miquelon');
			$this->addSelectOption('Sudan','Sudan');
			$this->addSelectOption('Suriname','Suriname');
			$this->addSelectOption('Svalbard and Jan Mayen Islands','Svalbard and Jan Mayen Islands');
			$this->addSelectOption('Swaziland','Swaziland');
			$this->addSelectOption('Sweden','Sweden');
			$this->addSelectOption('Switzerland','Switzerland');
			$this->addSelectOption('Syrian Arab Republic','Syrian Arab Republic');
			$this->addSelectOption('Taiwan','Taiwan');
			$this->addSelectOption('Tajikistan','Tajikistan');
			$this->addSelectOption('Tanzania, United Republic of','Tanzania, United Republic of');
			$this->addSelectOption('Thailand','Thailand');
			$this->addSelectOption('Togo','Togo');
			$this->addSelectOption('Tokelau','Tokelau');
			$this->addSelectOption('Tonga','Tonga');
			$this->addSelectOption('Trinidad and Tobago','Trinidad and Tobago');
			$this->addSelectOption('Tunisia','Tunisia');
			$this->addSelectOption('Turkey','Turkey');
			$this->addSelectOption('Turkmenistan','Turkmenistan');
			$this->addSelectOption('Turks and Caicos Islands','Turks and Caicos Islands');
			$this->addSelectOption('Tuvalu','Tuvalu');
			$this->addSelectOption('Uganda','Uganda');
			$this->addSelectOption('Ukraine','Ukraine');
			$this->addSelectOption('United Arab Emirates','United Arab Emirates');
			$this->addSelectOption('United Kingdom','United Kingdom');
			$this->addSelectOption('United States','United States');
			$this->addSelectOption('United States Minor Outlying Islands','United States Minor Outlying Islands');
			$this->addSelectOption('Uruguay','Uruguay');
			$this->addSelectOption('Uzbekistan','Uzbekistan');
			$this->addSelectOption('Vanuatu','Vanuatu');
			$this->addSelectOption('Vatican City State (Holy See)','Vatican City State (Holy See)');
			$this->addSelectOption('Venezuela','Venezuela');
			$this->addSelectOption('Viet Nam','Viet Nam');
			$this->addSelectOption('Virgin Islands (British)','Virgin Islands (British)');
			$this->addSelectOption('Virgin Islands (U.S.)','Virgin Islands (U.S.)');
			$this->addSelectOption('Wallis and Futuna Islands','Wallis and Futuna Islands');
			$this->addSelectOption('Western Sahara','Western Sahara');
			$this->addSelectOption('Yemen','Yemen');
			$this->addSelectOption('Yugoslavia','Yugoslavia');
			$this->addSelectOption('Zaire','Zaire');
			$this->addSelectOption('Zambia','Zambia');
			$this->addSelectOption('Zimbabwe','Zimbabwe');
		$this->endSelect();
		$this->javascript.='country: {required: true },';

		$this->textarea('o_sobie','Additional Info<pow>*</pow>:','block',5,40);
	$this->customAddForm('<em><pow>*</pow>Fileld are not required!</em>');
	$this->endFieldset();

	$this->startFieldset('Gender');

		$this->checkBox('radio','gender','male','Male');
		$this->checkBox('radio','gender','female','Female');

	$this->endFieldset();

	$this->startFieldset('Terms and other stuff');

		$this->checkBox('checkbox','terms','terms','<a href="#">Terms of use</a>');
		$this->javascript.='terms: {required: true },';
		$this->checkBox('checkbox','subscription','subscribtion','Subscribe us!<pow>*</pow>');
	$this->customAddForm('<em><pow>*</pow>Fileld are not required!</em>');
	$this->endFieldset();
	
	$this->startFieldset('Make action:');

		$this->submitForm();
		$this->resetForm();

	$this->endFieldset();
	$this->endForm();

	/*javascript end*/
	$this->javascript.="}});\n});\n</script>\n";
	}

	public function companyRegister(){
	/**
	*	Method creates new company register form with jquery javascript valideate code
	*	also you can modify fields with your preferences. 
	*/
	$this->javascript.="<script>\n$(document).ready(function(){\n $(\"form\").validate({rules: { ";
	
	$this->startFieldset('User Account');
		$this->textInput('login','Login:','block');
		$this->javascript.='login: {required: true, minlength: 6 },';
		
		$this->passInput('password','Password:','block');
		$this->javascript.='password: {required: true, minlength: 6 },';

		$this->passInput('passwordagain','Retype Password:','block');
		$this->javascript.='passwordagain: {required: true, equalTo: "#password" },';	

		$this->textInput('eMail','Your email:','block');
		$this->javascript.='eMail: {required: true, email: true},';

		$this->textInput('eMailagain','Your email again:','block');
		$this->javascript.='eMailagain: {required: true, equalTo: "#eMail"},';

	$this->customAddForm('<em><pow>*</pow>All fields are required!</em>');
	$this->endFieldset();

	$this->startFieldset('Company info');

		$this->textInput('CompanyName','Company Name:','block');
		$this->javascript.='CompanyName: {required: true, minlength: 3 },';

		$this->textInput('FirstName','Contact Person first name:','block');
		$this->javascript.='FirstName: {required: true, minlength: 3 },';
		
		$this->textInput('LastName','Contact Person last Name:','block');
		$this->javascript.='LastName: {required: true, minlength: 2 },';

		$this->textInput('Street','Street:','block');
		$this->javascript.='Street: {required: true, minlength: 2 },';

		$this->textInput('Number','House Number:','block');
		$this->javascript.='Number: {required: true, minlength: 1, digits:true },';

		$this->textInput('Locum','Locum Number<pow>*</pow>:','block');
		$this->javascript.='Locum: {minlength: 1, digits:true },';

		$this->textInput('TIN','Tax Identification Number:','block');
		$this->javascript.='TIN: {required:true, length: 10, digits:true },';
		
		$this->textInput('Region','Region<pow>*</pow>:','block');
		$this->javascript.='Region: {minlength: 3 },';
		
		$this->startSelect('country','Your Country:','block');
			$this->addSelectOption('','Chose...');
			$this->addSelectOption('Afghanistan','Afghanistan');
			$this->addSelectOption('Albania','Albania');
			$this->addSelectOption('Algeria','Algeria');
			$this->addSelectOption('American Samoa','American Samoa');
			$this->addSelectOption('Andorra','Andorra');
			$this->addSelectOption('Angola','Angola');
			$this->addSelectOption('Anguilla','Anguilla');
			$this->addSelectOption('Antarctica','Antarctica');
			$this->addSelectOption('Antigua and Barbuda','Antigua and Barbuda');
			$this->addSelectOption('Argentina','Argentina');
			$this->addSelectOption('Armenia','Armenia');
			$this->addSelectOption('Aruba','Aruba');
			$this->addSelectOption('Australia','Australia');
			$this->addSelectOption('Austria','Austria');
			$this->addSelectOption('Azerbaijan','Azerbaijan');
			$this->addSelectOption('Bahamas','Bahamas');
			$this->addSelectOption('Bahrain','Bahrain');
			$this->addSelectOption('Bangladesh','Bangladesh');
			$this->addSelectOption('Barbados','Barbados');
			$this->addSelectOption('Belarus','Belarus');
			$this->addSelectOption('Belgium','Belgium');
			$this->addSelectOption('Belize','Belize');
			$this->addSelectOption('Benin','Benin');
			$this->addSelectOption('Bermuda','Bermuda');
			$this->addSelectOption('Bhutan','Bhutan');
			$this->addSelectOption('Bolivia','Bolivia');
			$this->addSelectOption('Bosnia and Herzegowina','Bosnia and Herzegowina');
			$this->addSelectOption('Botswana','Botswana');
			$this->addSelectOption('Bouvet Island','Bouvet Island');
			$this->addSelectOption('Brazil','Brazil');
			$this->addSelectOption('British Indian Ocean Territory','British Indian Ocean Territory');
			$this->addSelectOption('Brunei Darussalam','Brunei Darussalam');
			$this->addSelectOption('Bulgaria','Bulgaria');
			$this->addSelectOption('Burkina Faso','Burkina Faso');
			$this->addSelectOption('Burundi','Burundi');
			$this->addSelectOption('Cambodia','Cambodia');
			$this->addSelectOption('Cameroon','Cameroon');
			$this->addSelectOption('Canada','Canada');
			$this->addSelectOption('Cape Verde','Cape Verde');
			$this->addSelectOption('Cayman Islands','Cayman Islands');
			$this->addSelectOption('Central African Republic','Central African Republic');
			$this->addSelectOption('Chad','Chad');
			$this->addSelectOption('Chile','Chile');
			$this->addSelectOption('China','China');
			$this->addSelectOption('Christmas Island','Christmas Island');
			$this->addSelectOption('Cocos (Keeling) Islands','Cocos (Keeling) Islands');
			$this->addSelectOption('Colombia','Colombia');
			$this->addSelectOption('Comoros','Comoros');
			$this->addSelectOption('Congo','Congo');
			$this->addSelectOption('Cook Islands','Cook Islands');
			$this->addSelectOption('Costa Rica','Costa Rica');
			$this->addSelectOption('Cote D&#039;Ivoire','Cote D&#039;Ivoire');
			$this->addSelectOption('Croatia','Croatia');
			$this->addSelectOption('Cuba','Cuba');
			$this->addSelectOption('Cyprus','Cyprus');
			$this->addSelectOption('Czech Republic','Czech Republic');
			$this->addSelectOption('Denmark','Denmark');
			$this->addSelectOption('Djibouti','Djibouti');
			$this->addSelectOption('Dominica','Dominica');
			$this->addSelectOption('Dominican Republic','Dominican Republic');
			$this->addSelectOption('East Timor','East Timor');
			$this->addSelectOption('Ecuador','Ecuador');
			$this->addSelectOption('Egypt','Egypt');
			$this->addSelectOption('El Salvador','El Salvador');
			$this->addSelectOption('Equatorial Guinea','Equatorial Guinea');
			$this->addSelectOption('Eritrea','Eritrea');
			$this->addSelectOption('Estonia','Estonia');
			$this->addSelectOption('Ethiopia','Ethiopia');
			$this->addSelectOption('Falkland Islands (Malvinas)','Falkland Islands (Malvinas)');
			$this->addSelectOption('Faroe Islands','Faroe Islands');
			$this->addSelectOption('Fiji','Fiji');
			$this->addSelectOption('Finland','Finland');
			$this->addSelectOption('France','France');
			$this->addSelectOption('France, Metropolitan','France, Metropolitan');
			$this->addSelectOption('French Guiana','French Guiana');
			$this->addSelectOption('French Polynesia','French Polynesia');
			$this->addSelectOption('French Southern Territories','French Southern Territories');
			$this->addSelectOption('Gabon','Gabon');
			$this->addSelectOption('Gambia','Gambia');
			$this->addSelectOption('Georgia','Georgia');
			$this->addSelectOption('Germany','Germany');
			$this->addSelectOption('Ghana','Ghana');
			$this->addSelectOption('Gibraltar','Gibraltar');
			$this->addSelectOption('Greece','Greece');
			$this->addSelectOption('Greenland','Greenland');
			$this->addSelectOption('Grenada','Grenada');
			$this->addSelectOption('Guadeloupe','Guadeloupe');
			$this->addSelectOption('Guam','Guam');
			$this->addSelectOption('Guatemala','Guatemala');
			$this->addSelectOption('Guinea','Guinea');
			$this->addSelectOption('Guinea-bissau','Guinea-bissau');
			$this->addSelectOption('Guyana','Guyana');
			$this->addSelectOption('Haiti','Haiti');
			$this->addSelectOption('Heard and Mc Donald Islands','Heard and Mc Donald Islands');
			$this->addSelectOption('Honduras','Honduras');
			$this->addSelectOption('Hong Kong','Hong Kong');
			$this->addSelectOption('Hungary','Hungary');
			$this->addSelectOption('Iceland','Iceland');
			$this->addSelectOption('India','India');
			$this->addSelectOption('Indonesia','Indonesia');
			$this->addSelectOption('Iran (Islamic Republic of)','Iran (Islamic Republic of)');
			$this->addSelectOption('Iraq','Iraq');
			$this->addSelectOption('Ireland','Ireland');
			$this->addSelectOption('Israel','Israel');
			$this->addSelectOption('Italy','Italy');
			$this->addSelectOption('Jamaica','Jamaica');
			$this->addSelectOption('Japan','Japan');
			$this->addSelectOption('Jordan','Jordan');
			$this->addSelectOption('Kazakhstan','Kazakhstan');
			$this->addSelectOption('Kenya','Kenya');
			$this->addSelectOption('Kiribati','Kiribati');
			$this->addSelectOption('Korea, Democratic People&#039;s Republic of','Korea, Democratic People&#039;s Republic of');
			$this->addSelectOption('Korea, Republic of','Korea, Republic of');
			$this->addSelectOption('Kuwait','Kuwait');
			$this->addSelectOption('Kyrgyzstan','Kyrgyzstan');
			$this->addSelectOption('Lao People&#039;s Democratic Republic','Lao People&#039;s Democratic Republic');
			$this->addSelectOption('Latvia','Latvia');
			$this->addSelectOption('Lebanon','Lebanon');
			$this->addSelectOption('Lesotho','Lesotho');
			$this->addSelectOption('Liberia','Liberia');
			$this->addSelectOption('Libyan Arab Jamahiriya','Libyan Arab Jamahiriya');
			$this->addSelectOption('Liechtenstein','Liechtenstein');
			$this->addSelectOption('Lithuania','Lithuania');
			$this->addSelectOption('Luxembourg','Luxembourg');
			$this->addSelectOption('Macau','Macau');
			$this->addSelectOption('Macedonia, The Former Yugoslav Republic of','Macedonia, The Former Yugoslav Republic of');
			$this->addSelectOption('Madagascar','Madagascar');
			$this->addSelectOption('Malawi','Malawi');
			$this->addSelectOption('Malaysia','Malaysia');
			$this->addSelectOption('Maldives','Maldives');
			$this->addSelectOption('Mali','Mali');
			$this->addSelectOption('Malta','Malta');
			$this->addSelectOption('Marshall Islands','Marshall Islands');
			$this->addSelectOption('Martinique','Martinique');
			$this->addSelectOption('Mauritania','Mauritania');
			$this->addSelectOption('Mauritius','Mauritius');
			$this->addSelectOption('Mayotte','Mayotte');
			$this->addSelectOption('Mexico','Mexico');
			$this->addSelectOption('Micronesia, Federated States of','Micronesia, Federated States of');
			$this->addSelectOption('Moldova, Republic of','Moldova, Republic of');
			$this->addSelectOption('Monaco','Monaco');
			$this->addSelectOption('Mongolia','Mongolia');
			$this->addSelectOption('Montserrat','Montserrat');
			$this->addSelectOption('Morocco','Morocco');
			$this->addSelectOption('Mozambique','Mozambique');
			$this->addSelectOption('Myanmar','Myanmar');
			$this->addSelectOption('Namibia','Namibia');
			$this->addSelectOption('Nauru','Nauru');
			$this->addSelectOption('Nepal','Nepal');
			$this->addSelectOption('Netherlands','Netherlands');
			$this->addSelectOption('Netherlands Antilles','Netherlands Antilles');
			$this->addSelectOption('New Caledonia','New Caledonia');
			$this->addSelectOption('New Zealand','New Zealand');
			$this->addSelectOption('Nicaragua','Nicaragua');
			$this->addSelectOption('Nigeria','Nigeria');
			$this->addSelectOption('Niue','Niue');
			$this->addSelectOption('Norfolk Island','Norfolk Island');
			$this->addSelectOption('Northern Mariana Islands','Northern Mariana Islands');
			$this->addSelectOption('Norway','Norway');
			$this->addSelectOption('Oman','Oman');
			$this->addSelectOption('Pakistan','Pakistan');
			$this->addSelectOption('Palau','Palau');
			$this->addSelectOption('Panama','Panama');
			$this->addSelectOption('Papua New Guinea','Papua New Guinea');
			$this->addSelectOption('Paraguay','Paraguay');
			$this->addSelectOption('Peru','Peru');
			$this->addSelectOption('Philippines','Philippines');
			$this->addSelectOption('Pitcairn','Pitcairn');
			$this->addSelectOption('Poland','Poland');
			$this->addSelectOption('Portugal','Portugal');
			$this->addSelectOption('Puerto Rico','Puerto Rico');
			$this->addSelectOption('Qatar','Qatar');
			$this->addSelectOption('Reunion','Reunion');
			$this->addSelectOption('Romania','Romania');
			$this->addSelectOption('Russian Federation','Russian Federation');
			$this->addSelectOption('Rwanda','Rwanda');
			$this->addSelectOption('Saint Kitts and Nevis','Saint Kitts and Nevis');
			$this->addSelectOption('Saint Lucia','Saint Lucia');
			$this->addSelectOption('Saint Vincent and the Grenadines','Saint Vincent and the Grenadines');
			$this->addSelectOption('Samoa','Samoa');
			$this->addSelectOption('San Marino','San Marino');
			$this->addSelectOption('Sao Tome and Principe','Sao Tome and Principe');
			$this->addSelectOption('Saudi Arabia','Saudi Arabia');
			$this->addSelectOption('Senegal','Senegal');
			$this->addSelectOption('Seychelles','Seychelles');
			$this->addSelectOption('Sierra Leone','Sierra Leone');
			$this->addSelectOption('Singapore','Singapore');
			$this->addSelectOption('Slovakia (Slovak Republic)','Slovakia (Slovak Republic)');
			$this->addSelectOption('Slovenia','Slovenia');
			$this->addSelectOption('Solomon Islands','Solomon Islands');
			$this->addSelectOption('Somalia','Somalia');
			$this->addSelectOption('South Africa','South Africa');
			$this->addSelectOption('South Georgia and the South Sandwich Islands','South Georgia and the South Sandwich Islands');
			$this->addSelectOption('Spain','Spain');
			$this->addSelectOption('Sri Lanka','Sri Lanka');
			$this->addSelectOption('St. Helena','St. Helena');
			$this->addSelectOption('St. Pierre and Miquelon','St. Pierre and Miquelon');
			$this->addSelectOption('Sudan','Sudan');
			$this->addSelectOption('Suriname','Suriname');
			$this->addSelectOption('Svalbard and Jan Mayen Islands','Svalbard and Jan Mayen Islands');
			$this->addSelectOption('Swaziland','Swaziland');
			$this->addSelectOption('Sweden','Sweden');
			$this->addSelectOption('Switzerland','Switzerland');
			$this->addSelectOption('Syrian Arab Republic','Syrian Arab Republic');
			$this->addSelectOption('Taiwan','Taiwan');
			$this->addSelectOption('Tajikistan','Tajikistan');
			$this->addSelectOption('Tanzania, United Republic of','Tanzania, United Republic of');
			$this->addSelectOption('Thailand','Thailand');
			$this->addSelectOption('Togo','Togo');
			$this->addSelectOption('Tokelau','Tokelau');
			$this->addSelectOption('Tonga','Tonga');
			$this->addSelectOption('Trinidad and Tobago','Trinidad and Tobago');
			$this->addSelectOption('Tunisia','Tunisia');
			$this->addSelectOption('Turkey','Turkey');
			$this->addSelectOption('Turkmenistan','Turkmenistan');
			$this->addSelectOption('Turks and Caicos Islands','Turks and Caicos Islands');
			$this->addSelectOption('Tuvalu','Tuvalu');
			$this->addSelectOption('Uganda','Uganda');
			$this->addSelectOption('Ukraine','Ukraine');
			$this->addSelectOption('United Arab Emirates','United Arab Emirates');
			$this->addSelectOption('United Kingdom','United Kingdom');
			$this->addSelectOption('United States','United States');
			$this->addSelectOption('United States Minor Outlying Islands','United States Minor Outlying Islands');
			$this->addSelectOption('Uruguay','Uruguay');
			$this->addSelectOption('Uzbekistan','Uzbekistan');
			$this->addSelectOption('Vanuatu','Vanuatu');
			$this->addSelectOption('Vatican City State (Holy See)','Vatican City State (Holy See)');
			$this->addSelectOption('Venezuela','Venezuela');
			$this->addSelectOption('Viet Nam','Viet Nam');
			$this->addSelectOption('Virgin Islands (British)','Virgin Islands (British)');
			$this->addSelectOption('Virgin Islands (U.S.)','Virgin Islands (U.S.)');
			$this->addSelectOption('Wallis and Futuna Islands','Wallis and Futuna Islands');
			$this->addSelectOption('Western Sahara','Western Sahara');
			$this->addSelectOption('Yemen','Yemen');
			$this->addSelectOption('Yugoslavia','Yugoslavia');
			$this->addSelectOption('Zaire','Zaire');
			$this->addSelectOption('Zambia','Zambia');
			$this->addSelectOption('Zimbabwe','Zimbabwe');
		$this->endSelect();
		$this->javascript.='country: {required: true },';

		$this->textarea('o_sobie','Additional Info<pow>*</pow>:','block',5,40);
	$this->customAddForm('<em><pow>*</pow>Fileld are not required!</em>');
	$this->endFieldset();

	$this->startFieldset('Gender');

		$this->checkBox('radio','gender','male','Male');
		$this->checkBox('radio','gender','female','Female');

	$this->endFieldset();

	$this->startFieldset('Terms and other stuff');

		$this->checkBox('checkbox','terms','terms','<a href="#">Terms of use</a>');
		$this->javascript.='terms: {required: true },';
		$this->checkBox('checkbox','subscription','subscribtion','Subscribe us!<pow>*</pow>');
	$this->customAddForm('<em><pow>*</pow>Fileld are not required!</em>');
	$this->endFieldset();
	
	$this->startFieldset('Make action:');

		$this->submitForm();
		$this->resetForm();

	$this->endFieldset();
	$this->endForm();

	/*javascript end*/
	$this->javascript.="}});\n});\n</script>\n";
	}
	
	function simpleUserReg(){
	
	/**
	*	Method create simple user reg form with minimum fields like login,password and email
	*	Contain also validation code for jquery validator plugin
	*/
	/*javascript init*/
	$this->javascript.="<script>\n$(document).ready(function(){\n $(\"form\").validate({rules: { ";
	$this->startFieldset('New User Account');
		$this->textInput('login','Login:','block');
		$this->javascript.='login: {required: true, minlength: 6 },';
		
		$this->passInput('password','Password:','block');
		$this->javascript.='password: {required: true, minlength: 6 },';

		$this->passInput('passwordagain','Retype Password:','block');
		$this->javascript.='passwordagain: {required: true, equalTo: "#password" },';	

		$this->textInput('eMail','Your email:','block');
		$this->javascript.='eMail: {required: true, email: true},';

		$this->textInput('eMailagain','Your email again:','block');
		$this->javascript.='eMailagain: {required: true, equalTo: "#eMail"},';
		$this->newline();
		$this->submitForm();
		$this->resetForm();

	$this->endFieldset();
	$this->endForm();

	/*javascript end*/
	$this->javascript.="}});\n});\n</script>\n";
	}

	function getValidator(){
	/**
	*	Method displays javascript code for form validation
	*	Please execute this metod inside <head> tag
	*/
	echo $this->javascript;
	}
}	
?>